ubusd: fix ACL check for receiving events
authorFelix Fietkau <[email protected]>
Fri, 17 Oct 2025 11:15:26 +0000 (11:15 +0000)
committerFelix Fietkau <[email protected]>
Fri, 17 Oct 2025 11:28:09 +0000 (13:28 +0200)
Wildcard event match must also be subject to ACL checks

Reported-by: Karsten Sperling <[email protected]>
Signed-off-by: Felix Fietkau <[email protected]>
ubusd_event.c

index 09c53dd62e93e6ef82e13bf137248f29e9aff43b..30369690846424d5a7d6909a0a63b5dd4f414faa 100644 (file)
@@ -93,7 +93,7 @@ static int ubusd_alloc_event_pattern(struct ubus_client *cl, struct blob_attr *m
                len--;
        }
 
-       if (pattern[0] && ubusd_acl_check(cl, pattern, NULL, UBUS_ACL_LISTEN))
+       if (ubusd_acl_check(cl, pattern, NULL, UBUS_ACL_LISTEN))
                return UBUS_STATUS_PERMISSION_DENIED;
 
        ev = calloc(1, sizeof(*ev) + len + 1);